home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
GAMEORTS
/
BASEBL.LZH
/
DLYBLD.BAS
< prev
next >
Wrap
BASIC Source File
|
1988-05-01
|
5KB
|
90 lines
100 REM CALCULATE DELAYS
102 GOSUB 800'display info
110 SKL1=1200:SKL2=1400:SKL3=1600:BATDLY=300:DKDLY=3000:HITDLY=3700
120 MXDLY=2500:RDLY1=2250:RDLY2=1000:SWDLY=7500:HMRDLY=250:UMPDLY=350
130 PCCLK=4.7
140 CLS:LOCATE 10,20
150 PRINT "ENTER YOUR MACHINE CLOCK SPEED IN MEGA HZ ":LOCATE 11,22
152 PRINT "AS A VALUE IN THE RANGE OF 4.7 TO 16 ":PRINT
154 LOCATE ,37:INPUT "",MCLK
155 IF MCLK=0 THEN MCLK=4.7:GOTO 160
158 IF MCLK < 4.7 OR MCLK > 20 THEN BEEP:GOTO 140
160 MFACTOR = MCLK/PCCLK
170 SKL1=INT(SKL1*MFACTOR)
180 SKL2=INT(SKL2*MFACTOR)
190 SKL3=INT(SKL3*MFACTOR)
200 BATDLY=INT(BATDLY*MFACTOR)
210 DKDLY=INT(DKDLY*MFACTOR)
220 HITDLY=INT(HITDLY*MFACTOR)
230 MXDLY=INT(MXDLY*MFACTOR)
240 RDLY1=INT(RDLY1*MFACTOR)
250 RDLY2=INT(RDLY2*MFACTOR)
260 SWDLY=INT(SWDLY*MFACTOR)
262 HMRDLY=INT(HMRDLY*MFACTOR)
264 UMPDLY=INT(UMPDLY*MFACTOR)
270' PRINT SKL1;SKL2;SKL3;BATDLY;DKDLY;HITDLY;MXDLY;RDLY1;RDLY2;SWDLY;HMRDLY;UMPDLY
275 LOCATE CSRLIN-1,16
280 PRINT "YOU ENTERED A VALUE OF ";:PRINT USING "##.##"; MCLK;:PRINT " IS THAT CORRECT (Y/N) ?"
290 C$=INKEY$: IF C$="" THEN 290
300 IF C$="Y" OR C$="y" THEN 310 ELSE 110
310 OPEN "BALL.DLY" FOR OUTPUT AS #1
320 WRITE #1, SKL1,SKL2,SKL3,BATDLY,DKDLY,HITDLY,MXDLY,RDLY1,RDLY2,SWDLY,HMRDLY,UMPDLY
325 PRINT #1, "DELAYS ARE SET FOR ";MCLK;" MHZ."
330 CLOSE #1
340 CLS:LOCATE 10,17:PRINT "THE DELAY FILE ";:PRINT CHR$(34);:PRINT "BALL.DLY";:PRINT CHR$(34);:PRINT " HAS BEEN CREATED"
345 LOCATE 12,17:PRINT "YOU MAY NOW PLAY BASEBALL BY TYPEING ";:PRINT CHR$(34);:PRINT "BALL";:PRINT CHR$(34);
350 LOCATE 1,1:SYSTEM
800 REM sub show install info
810 CLS:LOCATE 6,1
820 PRINT " PROCEDURE TO CREATE A FILE NAMED BALL.DLY":PRINT
830 PRINT " FOR USE BY THE BASEBALL PROGRAM. THE FILE":PRINT
840 PRINT " CONTAINS TIMING VALUES USED BY THE PROGRAM":PRINT
850 PRINT " TO CONTROL DELAYS AND HOW LONG THINGS STAY":PRINT
860 PRINT " AT A POSITION ON THE SCREEN BEFORE MOVEMENT.":PRINT
870 PRINT
880 PRINT " <<< PUSH A KEY FOR MORE INFORMATION >>>"
890 PRINT " PUSH ESC TO QUIT
900 C$=INKEY$:IF C$="" THEN 900
910 IF C$=CHR$(27) THEN SYSTEM ELSE CLS:LOCATE 3,1
920 PRINT" THE VALUE YOU WILL BE REQUESTED TO ENTER IS":PRINT
930 PRINT" REFERRED TO AS THE CLOCK SPEED OF YOUR":PRINT
940 PRINT" COMPUTER AND THAT IS THE MEASURE OF HOW FAST":PRINT
950 PRINT" YOUR COMPUTER OPERATES. THE BASEBALL PROGRAM":PRINT
960 PRINT" NEEDS TO KNOW THIS VALUE SO THAT IT CAN BE":PRINT
970 PRINT" USED ON COMPUTERS OF DIFFERENT SPEEDS AND":PRINT
980 PRINT" NOT APPEAR TO BE TOO SLOW OR TOO FAST. YOU":PRINT
990 PRINT" WILL ONLY HAVE TO ENTER A VALUE ONCE.":PRINT
1000 PRINT
1010 PRINT" <<< PUSH A KEY FOR MORE INFORMATION >>>"
1020 PRINT" PUSH ESC TO QUIT"
1030 C$=INKEY$:IF C$="" THEN 1030
1040 IF C$=CHR$(27) THEN SYSTEM ELSE CLS:LOCATE 3,1
1050 PRINT" THE DEFAULT CLOCK SPEED IS 4.7 MHZ AND ALL":PRINT
1060 PRINT" SPEEDS ARE DIRECTLY PROPORTIANAL TO THIS":PRINT
1070 PRINT" VALUE. IF YOU DON'T KNOW THE CLOCK SPEED OF":PRINT
1080 PRINT" YOUR COMPUTER YOU MAY USE THE FOLLOWING AS":PRINT
1090 PRINT" GUIDELINES OR YOU MAY EXPERIMENT WITH THIS":PRINT
2000 PRINT" PROCEDURE AND ENTER DIFFERENT VALUES UNTIL":PRINT
2010 PRINT" THE GAME LOOKS RIGHT FOR YOUR.":PRINT
2020 PRINT"
2030 PRINT" <<< PUSH A KEY FOR MORE INFORMATION >>>"
2040 PRINT" PUSH ESC TO QUIT"
2050 C$=INKEY$:IF C$="" THEN 2050
2060 IF C$=CHR$(27) THEN SYSTEM ELSE CLS:LOCATE 3,1
2070 PRINT" YOU MIGHT WANT TO MAKE NOTE OF THE FOLLOWING":PRINT
2080 PRINT" TO USE WHEN REQUESTED TO ENTER A CLOCK SPEED":PRINT
2090 PRINT" VALUE:":PRINT
2100 PRINT" COMPUTER TYPE CLOCK SPEED ENTRY":PRINT
2110 PRINT" IBM PC 4.7 (DEFAULT)":PRINT
2120 PRINT" IBM PC/XT 4.7 (DEFAULT)":PRINT
2130 PRINT" IBM PC/AT 8.0":PRINT
2140 PRINT" ZENITH 4.7 OR 8.0":PRINT
2150 PRINT" OTHER COMPATABLES 4.7 THRU 16":PRINT
2160 PRINT" <<< PUSH A KEY FOR MORE INFORMATION >>>"
2170 PRINT" PUSH ESC TO QUIT"
2180 C$=INKEY$:IF C$="" THEN 2180
2190 IF C$=CHR$(27) THEN SYSTEM
2200 RETURN